package API.Collection.Set.TreeSet.Arrange.ListStudent;

import java.util.Set;
import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        Set<Student> set = new TreeSet<>();
        Student s1 = new Student("Jack", 18, "01");
        Student s2 = new Student("Nick", 19, "02");
        Student s3 = new Student("Jack", 18, "03");
        set.add(s1);
        set.add(s2);
        set.add(s3);
        for(Student student : set) {
            System.out.println(student);
        }
    }
}
